package com.authine.cloudpivot.ext.facade.dubbo;

import com.authine.cloudpivot.engine.api.facade.Versionable;
import com.authine.cloudpivot.engine.api.model.ResponseResult;
import com.authine.cloudpivot.ext.model.OpenFormTypeModel;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import java.util.Map;

@Path("/api/v1/customerFacade")
@Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
@Consumes(MediaType.APPLICATION_JSON)
public interface CustomerFacade  extends Versionable {

    @Path("/findOpenFormTypeBySchemaCodeAndCode")
    @POST
    @Operation(summary = "查询表单打开类型", method = "POST")


    OpenFormTypeModel findOpenFormTypeBySchemaCodeAndCode(@Parameter(name = "scheamCode",  description = "模型编号", required = true)String scheamCode, @Parameter(name = "code",  description = "视图列表编号", required = true)String code);

    @Path("/saveOpenFormTypeBySchemaCodeAndCode")
    @POST
    @Operation(summary = "保存或修改表单打开类型", method = "POST")
    boolean saveOpenFormTypeBySchemaCodeAndCode(@Parameter(name = "openFormTypeModel", description = "表单打开类型")OpenFormTypeModel openFormTypeModel);



    /**
     * 自定义sql 查询
     * sql  :string
     * parameter :map
     * @param map
     * @return
     */
    @Path("/getListByMap")
    @POST
    @Operation(summary = "自定义sql查询 List", method = "POST")
    ResponseResult queryByMap(@Parameter(name = "map", description = "map参数{sql:string,parameter:map}")Map<String, Object> map);

}
